package app.project.directionlensproject.adapter;


import java.util.ArrayList;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import app.project.directionlensproject.MyApplication;
import app.project.directionlensproject.R;
import app.project.directionlensproject.fragment.FgListPlace;

public class UserPlaceAdapter extends FragmentPagerAdapter {
	ArrayList<FgListPlace> fgs;
	public UserPlaceAdapter(FragmentManager fm, ArrayList<FgListPlace> fgs) {
		super(fm);
		this.fgs = fgs;
	}

	@Override
	public Fragment getItem(int position) {
		return fgs.get(position);
	}

	@Override
	public int getCount() {
		return fgs.size();
	}

	@Override
	public CharSequence getPageTitle(int position) {
		if (position == 0) {
			return MyApplication.getAppContext().getString(R.string.hom_tab1);
		} else
			return MyApplication.getAppContext().getString(R.string.hom_tab2);
	}
}
